/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author THANHDAT
 */
public class DAO_Connect {
    
        public static Connection getConnection() {
        Connection con = null;
         try {
             String strUrl = "jdbc:sqlserver://localhost:1433;databaseName=Alluring_Decors;username=sa;password=123123";
             Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
             con = DriverManager.getConnection(strUrl);
         } catch (Exception e) {
             System.err.println("Không kết nối được!\n" + e.getMessage());
         }
         return con;
    }
}
